<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php
	$resultsText = JRequest::getVar('results_text') ;
	$noResultsText = JRequest::getVar('no_results_text') ;
?>
<div id="s5_search_results">			
	<?php
		if (count($this->results)) {
		?>
			<div class="s5_ls_top_bar">
				<a href="javascript:document.s5_search_form.limit.value='';document.s5_search_form.submit();">
					<span>
						<?php echo $this->pagination->total.' '.$resultsText; ?>
					</span>
				</a>
				<a href="javascript:closeResultDiv();" class="s5_ls_close"><img src="<?php echo JURI::root('').'/templates/sportopolis/images/live_search/exit.png'; ?>" /></a>
			</div>
		<?php	
			$i = 0 ;
			$tabClasses = array('s5_ls_result1', 's5_ls_result2');
			foreach( $this->results as $result ) {
				$result->text = str_replace('<span class="highlight">', '<span class="s5_ls_search_word">', $result->text) ;
				$tab = $tabClasses[$i];
			?>
				<div class="<?php echo $tab; ?>">
					<h3>
						<a href="<?php echo $result->href?>"><?php echo $result->title ; ?></a>
					</h3>
					<span>
						<?php echo $result->text ; ?>
					</span>		
				</div>			
			<?php	 
				$i = 1- $i ;
			}			
		?>
			<div class="s5_ls_bottom_bar">
				<a href="javascript:document.s5_search_form.limit.value='';document.s5_search_form.submit();">
					<span><?php echo $this->pagination->total.' '.$resultsText; ?></span>
				</a>
			</div>
		<?php		
		} else {
		?>
			<div class="s5_ls_top_bar">				
				<a href="javascript:closeResultDiv();" class="s5_ls_close"><img src="<?php echo JURI::root('').'/templates/sportopolis/images/live_search/exit.png'; ?>" /></a>
			</div>
			<div class="s5_ls_no_result">
				<?php echo $noResultsText;?>
			</div>
			<div class="s5_ls_bottom_bar">				
			</div>
		<?php	
		}
	?>												
</div>
